<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>

	<style type="text/css">
.ui-layout-north {
	z-index: 20 !important;
	overflow: visible !important;;
}

.ui-layout-north .ui-layout-unit-content {
	overflow: visible !important;
}

.ui-widget {
	font-size: 9px !important;
}

.size {
	width: 600px;
	position: relative;
	left: 25%;
	top: 10%;
}

.centro {
	top: 50%
}

.tabela {
	width: 750px;
}
</style>


	<title>Cadastro de Questão</title>
</h:head>

<h:body>

	<ui:decorate template="/templateBase.xhtml">

		<ui:define name="center">
			<p:growl id="growl" life="3000" autoUpdate="true" />
			<h:form prependId="true" id="formQuestao" acceptcharset="ISO-8859-1"
				lang="pt">
				<br />
				<br />
				<br />
				<br />
				<p:panel header="Cadastro de Questão" styleClass="size"
					footer="SAIES - Sistema de Avaliação Institucional de Ensino Superior">
					<br />

					<h:panelGrid columns="3">
						<h:outputText value="ID.......:" />
						<p:inputText disabled="true" size="5" />
						<p:commandButton oncomplete="dlgQuestao.show()"
							update=":formPesquisaQuestao:tblQuestao" icon="ui-icon-search" />
					</h:panelGrid>

					<h:panelGrid columns="2">
						<h:outputText value="Status" />
						<p:selectOneMenu value="#{questaoBacking.qSalvar.status}"
							required="true" requiredMessage="Informe o status.">
							<f:selectItem itemLabel="Selecione" itemDisabled="true" />
							<f:selectItem itemLabel="Ativa" itemValue="Ativa" />
							<f:selectItem itemLabel="Inativa" itemValue="Inativa" />
						</p:selectOneMenu>
						<h:outputText value="Público" />
						<p:selectOneMenu required="true"
							value="#{questaoBacking.qSalvar.tipo}"
							requiredMessage="Informe o público que destina a questão!">
							<f:selectItem itemDisabled="true" itemLabel="Selecione" />
							<f:selectItem itemLabel="Aluno" itemValue="Aluno" />
							<f:selectItem itemLabel="Docente" itemValue="Docente" />
							<f:selectItem itemLabel="Comum" itemValue="Docente_Aluno" />
						</p:selectOneMenu>
						<h:outputText value="Prova: " />
						<p:selectOneMenu value="#{questaoBacking.qSalvar.tipoProva}">
							<f:selectItem itemLabel="Selecione" itemDisabled="true" />
							<f:selectItem itemLabel="Avaliacao Docente"
								itemValue="Avaliacao Docente" />
							<f:selectItem itemLabel="Avaliacao Regimental"
								itemValue="Avaliacao Regimental" />

						</p:selectOneMenu>
						<h:outputText value="Área" />
						<p:selectOneMenu required="true"
							value="#{questaoBacking.qSalvar.areaConhecimentoQuestao}"
							requiredMessage="Informe a área que destina a questão!">
							<f:selectItem itemDisabled="true" itemLabel="Selecione" />
							<f:selectItem itemLabel="Biológicas" itemValue="Biologicas" />
							<f:selectItem itemLabel="Exatas" itemValue="Exatas" />
							<f:selectItem itemLabel="Humanas" itemValue="Humanas" />
							<f:selectItem itemLabel="Institucional" itemValue="Institucional" />
						</p:selectOneMenu>
					</h:panelGrid>
					<br />

					<h:panelGrid columns="1">
						<h:outputText value="Digite a Questão." />
						<p:inputTextarea autoResize="true" maxlength="100" required="true"
							requiredMessage="Informe a questão!" cols="80" rows="5"
							title="Digite a questão a ser cadastrada"
							value="#{questaoBacking.qSalvar.descricao}" />
					</h:panelGrid>

					<br />
					<p:separator />
					<br />
					<div align="center">
						<h:panelGrid columns="3">
							<p:commandButton value="Salvar"
								actionListener="#{questaoBacking.salvar}" update="growl"
								ajax="false" />
							<p:commandButton value="Excluir" />
							<p:commandButton value="Cancelar" />
						</h:panelGrid>
					</div>
				</p:panel>
			</h:form>

			<h:form id="formPesquisaQuestao" acceptcharset="ISO-8859-1" lang="pt">
				<p:dialog widgetVar="dlgQuestao" width="600" height="400"
					showEffect="clip" hideEffect="clip">
					<p:dataTable id="tblQuestao" rows="20">
						<p:column headerText="ID">

						</p:column>

						<p:column headerText="Descrição">

						</p:column>

						<p:column headerText="Público">

						</p:column>

						<p:column headerText="Área">

						</p:column>

						<p:column headerText="Ações">
							<p:commandButton value="Selecionar" />
						</p:column>

					</p:dataTable>
				</p:dialog>
			</h:form>

		</ui:define>
	</ui:decorate>
</h:body>
</html>